#ifndef INFINITY_WORLD_SECTOR_H
#	define INFINITY_WORLD_SECTOR_H

#include "planet.h"

namespace infinity {

class WorldSector
{
public : //! @name Constants
	//! @{
	static const dw::int32 SideCells = 16;
	//! @}

public : //! @name Construction & Destruction
	//! @{
	WorldSector();
	~WorldSector();
	//! @}

public : //! @name Helpers
	//! @{
	static Vector3i getSectorIdFromCell(const Vector3i& cellId);
	//! @}

public : //! @name Commands
	//! @{
	void generateCache(const Planet& planet);
	void clearCache();
	//! @}

public : //! @name Setup
	//! @{
	void setId(const Vector3i& id);
	//! @}

public : //! @name State
	//! @{
	const Vector3i& getId() const ;
	//! @}

public :
	dw::float32 priority;
	bool isCached;
	dw::int32 age;
	bool isInLru;

private : // @name Data
	//! @{
	Vector3i m_id;
	Planet::Cell* m_cells;
	//! @}
};

} // namespace infinity

#include "worldsector.inl"

#endif // !INFINITY_WORLD_SECTOR_H
